Xceed Toolkit Plus for WPF v4.6 Documentation
Other Classes
Welcome to Xceed Toolkit Plus for WPF v4.6 > DataGrid, ListBox, Chart, AvalonDock, and PropertyGrid > Datagrid control > Object Model Overview > Other Classes

The other topics discussed in this book deal with the major classes that compose Xceed DataGrid for WPF; however, there are other classes that also play a part in every grid.

Grouping-related Classes

When the content of a grid is grouped, complementary information on the group descriptions can be retrieved through a grid's GroupLevelDescriptions property, which contains a GroupLevelDescription object for each group level, such as the field name of the column whose values were used to create the groups as well as information on the data template that was used to create the Title for the specific group level.

By default, when a DataGridControl is created it contains a HierarchicalGroupByControl in its fixed headers section. The group-by control provides a condensed view of the group levels and allows end users to modify the group descriptions applied to a grid and any existing details. Each group level is represented by a HierarchicalGroupByItem that can be used to change the order of the groups, sort the data items, or remove the groups altogether. In addition, group-by items can be consulted to know if it is being dragged—to change the order or remove groups—through the IsBeingDragged property, while the SortDirection property can be used to retrieve the direction in which its associated column is sorted.

How the group-by items are displayed in a group-by control depends on the values of various properties exposed by the group-by control. These include the ConnectionLineAlignment, ConnectionLineOffset, ConnectionLinePen, StairHeight, and StairSpacing properties, which define the appearance of the connection lines and the space between the group-by items. When a grid or detail does not contain groups, the value of the NoGroupContent property will be displayed in the group-by control.

If a ColumnManagerRow (see Figure 4 in Grouping Data) is present in a grid or detail, its cells (ColumnManagerCell) can be dragged onto a group-by control to create an additional group level in a grid or detail. A column-manager cell's IsBeingDragged property can be consulted to know if it is being dragged to change the order of the columns or create new groups, while the IsPressed property can be used to know if a column is being sorted. End users can be prevented from modifying the existing group levels and sorting criteria through the group-by control's AllowGroupingModification and AllowSort properties respectively; however, grouping and sorting modifications can still be made programmatically, regardless of the value of the AllowGroupingModification and AllowSort properties.

GroupLevelIndicators indicate the number of group levels in a grid and are contained in a GroupLevelIndicatorPane. The width of the group-level indicators, when a grid is in a table view, can be modified through the GroupLevelIndicatorWidth property (see Table Views Overview). The group-level indicators can be hidden by setting the ShowIndicators attached property of the group-level-indicator pane to false, on the container or in the container's template whose corresponding indicators are to be hidden.

HierarchicalGroupLevelIndicatorPanes are used in conjunction with the GroupLevelIndicatorPanes when data items in a detail are grouped,. These panes contain pairs of GroupLevelIndicatorPanes and DetailIndicators that indicate the number of group levels and details, while the standard group-level-indicator pane indicates the group level information of its detail/context.

A GroupHeaderControl represents the control used as a group header, which is used to expand and collapse its associated group, as well as display information on the group's content, including the value that caused the group to be created, following the data template that was used to create a group's Title. The realized runtime group associated with a group-header control can be retrieved through its Group property. A group's Level property indicates to which group level a realized group belongs while the IsBottomLevel property can be consulted to immediately know if the group belongs to the last group level—the groups which contain the data items. The ItemCount property will return the number of the data items contained in a bottom-level group. In contrast, a group's parent groups can be retrieved through the ParentGroups property; however, if consulted for a top-level group null (Nothing in Visual Basic) will be returned. The SiblingGroups property returns the groups that are at the same level as the caller. Lastly, the IsExpanded property indicates whether a group is expanded or collapsed.

For more information on grouping, refer to the Grouping Data topic.

 

Back to DataGridContext Class